import { createRequest } from './index';

// 生成学生验证码
export const loginCaptchaStudent = data => {
  return createRequest({
    url: `/login/captcha`,
    responseType: 'arraybuffer',
    method: 'get'
  })
}

// 学生登录
export const loginStudent = data => {
  return createRequest({
    url: `/login`,
    method: 'post',
    data
  })
}

// 修改密码
export const modifyPassword = data => {
  return createRequest({
    url: `/user/updatePwd`,
    method: 'post',
    data
  })
}

//登出
export const signOut = () => {
    return createRequest({
        url: `/user/logout`,
        method: 'post',
    })
}

//刷新token
export const refreshToken = () => {
  return createRequest({
    url: `/user/refresh`,
    method: 'get'
  })
}



